package com.wang.tx.core;

import java.util.ArrayList;
import java.util.List;

// 支持中断恢复
public abstract class TccCallback {
    public static final int INIT = 0;
    public static final int TRY_OK = 1;
    public static final int TRY_FAIL = 2;
    public static final int SUCCESS = 3;
    public static final int FAIL = 4;

    public abstract void trySuccess();

    // try失败后，回调已经try成功的事务，用于保存现场
    public abstract void tryFail(List<TccTransaction> hasTry);

    public abstract void txSuccess();

    public abstract void txFail();
}
